package com.achievement.service;

import com.achievement.domain.dto.honor.HonorApplyBookDTO;
import com.achievement.domain.entity.HonorApplyBookEntity;
import com.achievement.domain.param.honor.HonorApplyBookParam;
import com.achievement.domain.param.honor.HonorApplyInfoParam;
import com.achievement.domain.vo.honor.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.common.api.BusinessApi;
import com.common.core.domain.AjaxResult;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

public interface IHonorApplyBookService extends IService<HonorApplyBookEntity> , BusinessApi {


    List<HonorApplyBookReviewVO> listByPage(HonorApplyBookParam param);

    /**
     * 获取申报材料列表左上方状态分组统计
     * @param param
     * @return
     */
    List<HashMap<String, Integer>> listStatistics(HonorApplyBookParam param);

    /**
     * 获取某个专家的评审成果列表
     * @param applyInfoId
     * @param reviewerId
     * @return
     */
    List<HonorApplyBookReviewVO> expertReviewBookListByReviewPlan(String applyInfoId, String reviewerId);
    /**
     * 获奖申报-申报材料列表 导出excel
     * @param param
     * @return
     */
    List<HonorApplyBookExcelVO> lisExcelByPage(HonorApplyBookParam param);
    List<HonorApplyBookEntity> getListByConditions(HonorApplyBookDTO honorApplyBookDTO);
    HonorApplyBookVO getInfoById(String id);

    /**
     * 成果申报
     * @param dto
     * @return
     */
    AjaxResult addHonorApplyBookAndHonorApplyBookMember(HonorApplyBookDTO dto);
    /**
     * 成果申报修改
     * @param dto
     * @return
     */
    AjaxResult updateHonorApplyBookAndHonorApplyBookMember(HonorApplyBookDTO dto);

    boolean add(HonorApplyBookDTO dto);

    boolean update(HonorApplyBookDTO dto);

    boolean batchRemove(List<String> ids);

    /**
     * 获奖评审指派专家，获取所有专家信息
     * @return
     */
    List<AchievementExpertVO> allExpertList();

    /**
     * 根据专家biz_expert 的id获取专家信息
     * @param id
     * @return
     */
    AchievementExpertVO ExpertById(String id);
    /**
     * 获取意见汇总信息表
     * @return
     */
    HonorApplyBookExpertReviewResultVO honorApplyBookExpertReviewDetailById(@Param(value = "id") String id);

    /**
     * 专家获取自己的评审结果
     * @param id 成果Id
     * @param expertId
     * @return
     */
    HonorApplyBookExpertReviewResultVO honorApplyBookExpertReviewDetailByIdAndExpertId(String id, String expertId,String expertSysId);
    /**
     * 管理员审核成果
     * @param
     * @return
     */
    boolean updateHonorApplyBookCheckStatus(String id,String status);
    /**
     * 管理员科研秘书获奖申报设置获奖
     * @param
     * @return
     */
    boolean updateHonorApplyBookHonorState(HonorApplyBookDTO dto);
    /**
     * 成果评审-专家角色获取自己评审的成果列表
     * @param expertId
     * @return
     */
    List<HonorApplyBookByExpertVO> honorApplyBookListByExpert(Integer reviewStatus,  String expertId);

    /**
     * 管理员批准获奖
     */
    boolean approveHonor(HonorApplyBookDTO dto);
    /**
     * 管理员撤销获奖
     */
    boolean revokeHonor(HonorApplyBookDTO dto);

    boolean updateHonorState(HonorApplyBookDTO dto);

}
